%%

my_status = cell(64, 1);
my_bytes = cell(64, 1);

% Send the adc command            
fprintf(s, 'adc\n');

for count = 1 : 64
    my_status{count} = s.TransferStatus;
    my_bytes{count} = s.BytesAvailable;
    pause(0.001);
end

%%

my_status = cell(64, 1);
my_bytes = cell(64, 1);

% Send the adc command            
fprintf(s, 'pwm 1 1 100');

for count = 1 : 64
    my_status{count} = s.TransferStatus;
    my_bytes{count} = s.BytesAvailable;
    pause(0.001);
end


%%
my_bytes{end}
serial_pause = 0.001;
while s.BytesAvailable > 4            
    fscanf(s)
    pause(serial_pause);
end 

%% 
fprintf(s, 'pwm 1 1 0');